package scala40rules;

import java.util.ArrayList;

public class SymbolList {

	private ArrayList<String> symbolList = new ArrayList<String>();
	
	public SymbolList(){
		symbolList.add("A");
		for(int i=2; i<11; i++){
			symbolList.add(Integer.toString(i));
		}
		symbolList.add("J");
		symbolList.add("Q");
		symbolList.add("K");
		symbolList.add("Jolly");
	}

	public ArrayList<String> getSymbolList() {
		return symbolList;
	}

	public void setSymbolList(ArrayList<String> symbolList) {
		this.symbolList = symbolList;
	}
	
	public String getSymbol(int position){
		String symbol = null;
		try{
			symbol = this.symbolList.get(position);
		}catch (IndexOutOfBoundsException e) {
			System.out.println("[SymbolList] lista outOfBound in getSymbol  || tentativo d'accesso alla posizione "+position);
		}
		return symbol;	
	}

	public int size(){
		//return this.size();
		return 14;
	}
}


